
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<?php 
if(!isset($_SESSION['UserName']))
{
//	include "formdangnhap.php"; 
echo "<script language='javascript'>alert(' Bạn phải đăng nhập !'); location.href='../index.php';</script>";
}
?>

<table width="530" border="1" align="center" bgcolor="#FFC">

  <tr align="center">
    <td colspan="5">Các Loại Máy<br />
    <a href="index.php?ACT=themloaimay">Thêm</a></td>
  </tr>
  <tr align="center">
    <td width="100">idLM</td>
    <td width="300">Tên Loại</td>
    <td width="100">Sửa</td>
    <td width="100">Xóa</td>
  </tr>
  <?php 
require_once("connect/dbcon.php");
$s="select * from loaimay";
$kq=mysql_query($s,$link);
while($d=mysql_fetch_array($kq))
	{
?>
  <tr align="center">
    <td><?php echo $d["idLM"];?></td>
    <td><?php echo $d["TenLoai"];?></td>
    <td><a href="index.php?ACT=sualm&idLM=<?php echo $d["idLM"];?>">Sửa</a></td>
    <td><a href="index.php?ACT=xoalm&idLM=<?php echo $d["idLM"];?>">Xóa</a></td>
  </tr>
<?php
	}
?>
</table>

</body>
</html>